﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QLNSClient
{
    public partial class viewImgKT : Form
    {
        public viewImgKT()
        {
            InitializeComponent();
        }

        private void viewImgKT_Load(object sender, EventArgs e)
        {
            string ma_cb=uc_qdKhenthuong.macb;
            int ma_kt = uc_qdKhenthuong.makt;
            Byte[] byteBLOBData = uc_qdKhenthuong.byteBLOBData;

            //DataTable dt_anh = new DataTable();
            //sqlHelper.Fill(dt_anh, "select FileQuyetDinh from CANBO_KHENTHUONG where Ma_CB='" + ma_cb + "' and Ma_KT='" + ma_kt + "'");

            //Byte[] byteBLOBData = new Byte[0];
            //byteBLOBData = (Byte[])(dt_anh.Rows[0][0]);
            if (byteBLOBData.Length != 0)
            {
                MemoryStream stmBLOBData = new MemoryStream(byteBLOBData);
                pictureEdit1.Image = Image.FromStream(stmBLOBData);


            }
            else
            {
                pictureEdit1.Image = null;
            }

        }
    }
}
